#ifndef SPHERE_H
#define SPHERE_H

#include "Geometry.h"

struct WSphere: public Geometry {
    vec3 center;
    float radius;

    WSphere() {
        name = "Sphere";
    }

    Symbol parse(ifstream &file, Symbol cur);
    bool intersect (Ray *r);
    vec3 getNormal(Ray *r);
    vec3 genRandomPoint(vec3 look, int cur, int lim);

    void print() {
        printf("Sphere:\n\tCenter: %f %f %f\n\tRadius: %f\n",
            center.x, center.y, center.z, radius);

        Geometry::print();
    }

    AABB *generateAABB();

    int type() {
        return 0;
    }
};

#endif
